#ifndef _DATABASE_HPP_
#define _DATABASE_HPP_

#include <QtSql/QSqlDatabase>
#include <QtSql/QSqlQuery>
#include <boost/optional.hpp>

/*---------------------------------------------------------------------------*/

namespace DatabaseManager {

/*---------------------------------------------------------------------------*/

class Database
{
/*---------------------------------------------------------------------------*/

public:

/*---------------------------------------------------------------------------*/

	Database();

	~Database();

	void open( const char* _databaseName );

	void close();

	void insertVCS( const char* _url, const char* _username, const char* _password );

/*---------------------------------------------------------------------------*/

private:

/*---------------------------------------------------------------------------*/

	QSqlDatabase m_database;

	boost::optional< QSqlQuery > m_insertVcsQuery;

/*---------------------------------------------------------------------------*/

};

/*---------------------------------------------------------------------------*/

} // namespace DatabaseManager

/*---------------------------------------------------------------------------*/

#endif // _DATABASE_HPP_
